#ifndef KEYBOARD_H_
#define KEYBOARD_H_

#include <stdio.h>
#include <stdlib.h>
#include "altera_up_avalon_ps2.h"
#include "altera_up_ps2_keyboard.h"

//#define TEXT_LEN    1024

#define MAX_LINE 50
#define LINE_LEN 16

#define F2          0x06
#define ENTER       0x5a
#define TAB         0x0d
#define SPACE       0x29
#define BKSP        0x66

#define LEFT 0x6b
#define UP 0x75
#define RIGHT 0x74
#define DOWN 0x72
#define END 0x69

//unsigned char buffer[TEXT_LEN];

unsigned char context[MAX_LINE][LINE_LEN+1];
extern int showline,showpos;
extern int curline,curpos;

void test_keyboard(alt_up_ps2_dev *ps2_kb);

#endif /*KEYBOARD_H_*/
